package com.prp.gwt.client.user.mail;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.prp.gwt.client.ClientException;
import com.prp.gwt.client.vo.MailBoxList;
import com.prp.gwt.client.vo.MailInfo;
import com.prp.gwt.client.vo.MailboxInfo;
import com.prp.gwt.client.vo.NewMail;
import com.prp.gwt.client.vo.User;

@RemoteServiceRelativePath("mailRequest")
public interface MailService extends RemoteService  {
	
	public void signOut();
	public User updateUser() throws ClientException;
	public boolean verify();
	
	public MailBoxList getInMailList()throws ClientException;
	public MailBoxList getOutMailList() throws ClientException;
	public MailInfo getMail(int mailId)throws ClientException;
	public MailboxInfo deleteInbox(MailboxInfo mailboxInfo)throws ClientException;
	public MailboxInfo deleteOutbox(MailboxInfo mailboxInfo) throws ClientException;
	public int sendMail(NewMail mail);
	
	public MailBoxList getInboxMailList(int userId);
	public MailBoxList getOutboxMailList(int userId);
	public MailboxInfo getMailboxInfo(int mailboxId);
	public MailInfo getMailInfo(int mailboxId);
	
	public boolean canSendMassMail();
	public int sendMassMail(NewMail newMail);
	public void validateAuth(int identity)throws ClientException;
}
